package edu.hnu.cloudflight.android.util;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class FlightDBHelper extends SQLiteOpenHelper {

	private final static String dbName ="flight.db";
	private final static int version=1;
	
	public FlightDBHelper(Context context){
		super(context, dbName, null, version);
	}
	@Override
	public void onCreate(SQLiteDatabase db) {

		db.execSQL("create table if not exists flight(id integer primary key autoincrement,flightnum varchar(20),start varchar(20), end varchar(20),company varchar(10),date varchar(50),user varchar(100) )");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub

	}

}
